Rename packages/cua-cli to packages/cli - #26
Conversation
Move the CLI workspace directory to packages/cli. The npm package name (@onkernel/cua-cli), binary name (cua), and workspace identity are all unchanged. Updates root package.json workspaces, tsconfig project references, package-lock.json paths, bin/cua wrapper, README workspace table and Mermaid diagram, docs/architecture.md prose and diagram, and the update-docs skill's CLI runtime flow note. Historical plan documents (docs/cua-cli-harness-migration.md, .cursor/plans/cua-ai-agent.md) keep their prose as-is. Tests under packages/cli still pass (29 passed, 4 TUI fixture tests skipped without ptywright native build).
rgarcia
left a comment
There was a problem hiding this comment.
Reviewed the full diff, checked out the branch, and independently re-verified. Approving — no blockers or majors.
Verified
- Renames: all 41 package files are 100%-similarity renames;
git log --followtraces history through the move. - Reference sweep: independent
grep -rnforpackages/cua-cliandcua-cli/path forms across the repo (including hidden dirs.agents,.github,.cursor) finds only.cursor/plans/cua-ai-agent.md:5— a historical plan document, correctly left as-is. Remainingcua-climentions are the unchanged package name (@onkernel/cua-cli), the binary identity, or the separateskills/cua-cli/skill directory (which still exists at that path, so README lines 307/313/324 remain correct). - CI: read
.github/workflows/ci.ymlend-to-end — thecli-unitjob and all others reference the workspace by name (npm test --workspace @onkernel/cua-cli), never by path; ptywright cache keys only hashpackages/ptywright/**. No workflow changes needed, as claimed. - Lockfile: diff vs main is exactly the 3 mechanical path lines.
npm ci(what CI runs) succeeds against the hand-edited lockfile. I confirmed the 411-line prune an unconstrainednpm installproduces is identical on main — it's orphaned transitive deps from the earlier package removals, so deferring that cleanup keeps this diff mechanical. Good call. - Build + tests:
npm run buildTS steps succeed;npm test --workspace @onkernel/cua-cli→ 29 passed, 4 skipped (TUI fixtures need the ptywright native binding; the zigcombine_archivesfailure reproduces identically on main in this environment — CI builds it with its own zig toolchain, unaffected by this rename). bin/cua: the path fix is correct — the wrapper now resolvespackages/cli/dist/cli.js../bin/cua --helpexits 1, but I confirmed the identicalERR_MODULE_NOT_FOUND: ./cli-harnessfailure on main:dist/cli.jsis emitted with extensionless relative ESM imports that plainnoderejects (masked in tests because vitest resolves TS sources directly). Preexisting, not introduced here.- Judgment calls: leaving
skills/cua-cli/in place, keepingcua-cli-*tmpdir prefixes in tests (derived from the package name, not the path), and not touching the historical plan docs are all consistent with the rename-the-directory-only scope.
Findings
- minor (preexisting, for the series):
dist/cli.jscan't run under plainnodedue to extensionless relative ESM imports (./cli-harness,./action/prompts, ...). Harmless to this PR and the wrapper is slated for deletion next, but the release PR will ship"bin": "./dist/cli.js"— an npm-installedcuawould hit the same crash. Worth fixing (emit.jsextensions or bundle the CLI) before publishing. - nit: the PR body lists a README "Mermaid block" among the updated path references, but the README mermaid uses package-name nodes and was correctly untouched (the updated mermaid is in
docs/architecture.md). Cosmetic description inaccuracy only.
|
Created a monitoring plan for this PR. What this PR does: Internal repository reorganization — renames the CLI package directory from Intended effect: No production telemetry signal exists for this change. The Risks:
No post-merge monitoring window required; this change carries no runtime blast radius. |
Summary
PR 1 of 3 in the cua-cli follow-up series. Moves the CLI workspace
directory from
packages/cua-clitopackages/cli. The npm packagename (
@onkernel/cua-cli), the published binary name (cua), and theworkspace name all stay unchanged — only the directory path changes.
Changes
git mv packages/cua-cli packages/cli(preserves file history).package.jsonworkspaces, roottsconfig.jsonproject references,bin/cuawrapper,README.mdworkspace tree / workspace table / project-layout tree / CLI-reference
link,
docs/architecture.mdprose and mermaid diagram, and.agents/skills/update-docs/SKILL.md's CLI runtime flow note.package-lock.jsonregenerated as a mechanical 3-line workspace pathrename (no other entries touched).
docs/cua-cli-harness-migration.mdand.cursor/plans/cua-ai-agent.md) keep their prose as-is.skills/cua-cli/is a separate skill directory unrelated to the package and is left in
place. Tests under
packages/cli/test/usecua-cli-*tmpdir prefixesthat derive from the package name (which is unchanged) rather than the
directory path, so they're left as-is.
.github/workflows/ci.ymlonly references the unchanged workspacename
@onkernel/cua-cli; no path filters or working-directory entriesneeded updating.
Tests
npm test --workspace @onkernel/cua-cli— 29 passed, 4 TUI fixturetests skipped (require ptywright native zig build; same as on
main).tsc -bbuild for the cli workspace succeeds end-to-end../bin/cua --helpinvocationerrors with
ERR_MODULE_NOT_FOUNDfor./cli-harnessbecause theTypeScript emit uses extensionless ESM imports — same on
main, notintroduced by this PR. The
bin/cuawrapper is slated for removal inthe next PR of this series.
build:nativestep (Ghostty/Zig combine_archives) alsofails in this sandbox; reproduces identically on
mainand is notrelated to this rename.
Out of scope
This is part of a 3-PR series. Subsequent PRs handle additional cleanup
and the npm release plumbing.
Note
Low Risk
Path-only rename with no runtime or API changes; risk is limited to missed path references, and CI still targets
@onkernel/cua-cliby workspace name.Overview
Renames the CLI workspace directory from
packages/cua-clitopackages/cliwhile keeping the npm package name@onkernel/cua-cli, thecuabinary, and workspace script targets unchanged.Build and workspace wiring now point at the new path: root
package.jsonworkspaces,tsconfig.jsonproject references,package-lock.jsonworkspace/link entries, andbin/cua(packages/cli/dist/cli.js).Docs and agent skills were updated so trees, links, and architecture notes reference
packages/cli(README workspace table, project layout, CLI README link,docs/architecture.mdprose and mermaid paths,.agents/skills/update-docs/SKILL.mdCLI runtime flow list). Historical plan docs andskills/cua-cli/were left as-is per PR scope.Reviewed by Cursor Bugbot for commit 66a25ed. Bugbot is set up for automated code reviews on this repo. Configure here.